package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZhFeedbackMapper;
import com.ruoyi.system.domain.ZhFeedback;
import com.ruoyi.system.service.IZhFeedbackService;
import com.ruoyi.common.support.Convert;
import org.springframework.transaction.annotation.Transactional;

/**
 * 意见反馈 服务层实现
 * 
 * @author ruoyi
 * @date 2019-06-27
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ZhFeedbackServiceImpl implements IZhFeedbackService 
{
	@Autowired
	private ZhFeedbackMapper zhFeedbackMapper;

	/**
     * 查询意见反馈信息
     * 
     * @param id 意见反馈ID
     * @return 意见反馈信息
     */
    @Override
	public ZhFeedback selectZhFeedbackById(Integer id)
	{
	    return zhFeedbackMapper.selectZhFeedbackById(id);
	}
	
	/**
     * 查询意见反馈列表
     * 
     * @param zhFeedback 意见反馈信息
     * @return 意见反馈集合
     */
	@Override
	public List<ZhFeedback> selectZhFeedbackList(ZhFeedback zhFeedback)
	{
	    return zhFeedbackMapper.selectZhFeedbackList(zhFeedback);
	}
	
    /**
     * 新增意见反馈
     * 
     * @param zhFeedback 意见反馈信息
     * @return 结果
     */
	@Override
	public int insertZhFeedback(ZhFeedback zhFeedback)
	{
	    return zhFeedbackMapper.insertZhFeedback(zhFeedback);
	}
	
	/**
     * 修改意见反馈
     * 
     * @param zhFeedback 意见反馈信息
     * @return 结果
     */
	@Override
	public int updateZhFeedback(ZhFeedback zhFeedback)
	{
	    return zhFeedbackMapper.updateZhFeedback(zhFeedback);
	}

	/**
     * 删除意见反馈对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteZhFeedbackByIds(String ids)
	{
		return zhFeedbackMapper.deleteZhFeedbackByIds(Convert.toStrArray(ids));
	}

	/**
	 * 完结意见反馈
	 *
	 * @param id
	 * @return
	 */
	@Override
	public int setFinished(Integer id) {
		return zhFeedbackMapper.setFinished(id);
	}

}
